import 'package:dk_flutter_base/src/ui/widget/dk_app_bar.dart';
import 'package:flutter/material.dart';

class AppBarWidget extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    var dkAppBar = DkAppBar(DKAppBarParams(
        context: context,
        actions: [
          Container(
            color: Colors.red,
            alignment: AlignmentDirectional.center,
            child: Text(
              "新建陪访",
              key: key,
              textAlign: TextAlign.justify,
            ),
          )
//        IconButton(icon: Icon(Icons.navigation),
//        onPressed: (){},)
        ],
        bottom: PreferredSize(
            child: Container(
              child: Text("内容"),
              height: 155,
            ),
            preferredSize: Size.fromHeight(55)),
        titleContent: "测试"));
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
          primaryColor: Colors.white,
          backgroundColor: Colors.white,
          accentColor: Color(0xFF3DBCC6),
          primaryColorBrightness: Brightness.light,
          primaryTextTheme: TextTheme(
            //设置Material的默认字体样式
            title:
                TextStyle(color: Color(0xff333333), fontSize: 17.0),
          ),
          primaryIconTheme: IconThemeData(
            color: Color(0xff333333),
            size: 20.0,
          ),
          appBarTheme: AppBarTheme(
              textTheme: TextTheme(
                title: TextStyle(
                    color: Color(0xff333333), fontSize: 17),
                body1: TextStyle(
                    color: Color(0xff333333), fontSize: 17),
              ),
              elevation: 0.5,
              actionsIconTheme: IconThemeData(size: 16))),
      home: Scaffold(appBar: dkAppBar),
    );
  }
}
